//
//  SinaTextField.swift
//  SinaWeiBo
//
//  Created by 王忠楠 on 16/9/19.
//  Copyright © 2016年 wangzn. All rights reserved.
//

import UIKit
//实时看到xib设置后的效果
@IBDesignable

class SinaTextField: UITextField {

    //边框颜色
    
    @IBInspectable var borderColor:UIColor? {
        didSet{
            self.layer.borderColor = borderColor?.cgColor
            
        }
        
    }
    //设置边框的宽度
    @IBInspectable var borderWidth:CGFloat = 0 {
        didSet{
            self.layer.borderWidth = borderWidth
            
        }
        
    }
    
    
    //设置边框弧度
    @IBInspectable var cornerRadius :CGFloat = 0 {
        didSet{
            self.layer.cornerRadius = cornerRadius
            
            self.layer.masksToBounds = true
            
        }
        
        
        
    }
    
    
}
